How to compare string using the (!=) operator in Python